package cn.nyh.test.dao;

import cn.nyh.test.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserDao {
    @Insert("insert t_user(username,sex,birthday,)values(#{username},#{sex},#{birthday})")
    public User add(User user);

    @Select("select * from t_user where uid = #{uid}")
    public User findById(Integer uid);

    @Delete("delete * from t_user where uid = #{uid}")
    public User deleteById(Integer uid);

    @Update("update t_user set username = #{username},sex = #{sex},date = #{date} where uid = #{uid}")
    public User updateById(Integer uid);
}
